<div class="modal-header">
    <h4 class="modal-title">添加库位</h4>
</div>

<div class="modal-body">
    <form class="form-horizontal" name="addLocationForm" novalidate ng-submit="ok()">
        <div class="form-group">
            <label class="col-sm-3 ">区域</label>
            <div class="col-sm-8">
                <ui-select ng-model="location.areaCode" theme="bootstrap"
                           on-select="selectAreaCode($select.selected);" required>
                    <ui-select-match placeholder="选择区域">{{$select.selected.name}}</ui-select-match>
                    <ui-select-choices
                            repeat="areaCode in location.areaCodes | filter: $select.search">
                        <div ng-bind-html="areaCode.name | highlight: $select.search"></div>
                    </ui-select-choices>
                </ui-select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 ">库位</label>
            <div class="col-sm-8">
                <input  type="text" class="form-control" ng-model="location.location"
                       placeholder="请输入库位" required>
            </div>
            <div class="col-sm-3"></div>
        </div>
    </form>
</div>

<div class="modal-footer">
    <div class="row">
        <div class="col-xs-4 col-xs-offset-1">
            <button class="btn btn-default btn-action" ng-click="cancel()">取 消</button>
        </div>
        <div class="col-xs-2"></div>
        <div class="col-xs-4">
            <button class="btn btn-primary btn-action" ng-disabled="loading||!addLocationForm.$valid" ng-click="ok()">
                确 定
            </button>
        </div>
    </div>
</div>



